Skip to content

fix(embed): include calOrigin for non-default cloud domains#28498

Draft
abdulbaqui17 wants to merge 3 commits intocalcom:mainfrom
abdulbaqui17:fix-28443-embed-cal-origin
Draft

fix(embed): include calOrigin for non-default cloud domains#28498
abdulbaqui17 wants to merge 3 commits intocalcom:mainfrom
abdulbaqui17:fix-28443-embed-cal-origin

Conversation

@abdulbaqui17
Copy link

@abdulbaqui17 abdulbaqui17 commented Mar 19, 2026

Summary

  • fix embed snippet generation to include calOrigin for non-default Cal cloud domains (for example app.cal.eu)
  • keep omitting calOrigin for default cloud origins (https://app.cal.com and https://cal.com)
  • add regression tests for origin detection logic, including trailing slash normalization

Why

Published @calcom/embed-react defaults to app.cal.com. For users on non-default cloud domains like app.cal.eu, snippets generated without calOrigin can resolve iframe URLs to the wrong TLD and return 404.

Testing

  • TZ=UTC yarn vitest run packages/features/embed/lib/EmbedCodes.test.ts (run in local workspace where dependencies are already available)

Fixes #28443


Summary by cubic

Fixes embed snippets to include calOrigin for non-default cloud domains and preserves original duration in the reschedule flow. Also updates attendee emails to use the organizer’s time format when the attendee doesn’t have one set.

  • Bug Fixes
    • Embed: include calOrigin for non-default cloud origins (e.g., app.cal.eu); omit for https://app.cal.com and https://cal.com; handles trailing slashes; adds regression tests in packages/features/embed/lib/EmbedCodes.test.ts.
    • Reschedule: pass duration based on the original booking length; keeps dynamic durations; adds tests for reschedule link and duration fallback.
    • Emails: fallback to organizer timeFormat in AttendeeScheduledEmail when attendee preference is missing; adds test coverage.

Written for commit 90a1143. Summary will update on new commits.

@CLAassistant
Copy link

CLAassistant commented Mar 19, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 7 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong TLD of domain in iframe, Error Code: 404. Cal Link seems to be wrong

2 participants